<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.5"/>
<title>pciepsu: xpciepsu_egress_ep_enable_example.c File Reference</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="navtree.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="resize.js"></script>
<script type="text/javascript" src="navtree.js"></script>
<script type="text/javascript">
  $(document).ready(initResizable);
  $(window).load(resizeHeight);
</script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
<link href="HTML_custom.css" rel="stylesheet" type="text/css"/>
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td id="projectlogo"><img alt="Logo" src="xlogo_bg.png"/></td>
  <td style="padding-left: 0.5em;">
   <div id="projectname">pciepsu
   </div>
   <div id="projectbrief">Vitis Drivers API Documentation</div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.5 -->
  <div id="navrow1" class="tabs">
    <ul class="tablist">
      <li><a href="index.html"><span>Overview</span></a></li>
      <li><a href="globals.html"><span>APIs</span></a></li>
      <li><a href="files.html"><span>File&#160;List</span></a></li>
      <li><a href="pages.html"><span>Examples</span></a></li>
    </ul>
  </div>
</div><!-- top -->
<div id="side-nav" class="ui-resizable side-nav-resizable">
  <div id="nav-tree">
    <div id="nav-tree-contents">
      <div id="nav-sync" class="sync"></div>
    </div>
  </div>
  <div id="splitbar" style="-moz-user-select:none;" 
       class="ui-resizable-handle">
  </div>
</div>
<script type="text/javascript">
$(document).ready(function(){initNavTree('xpciepsu__egress__ep__enable__example_8c.html','');});
</script>
<div id="doc-content">
<div class="header">
  <div class="summary">
<a href="#func-members">Functions</a>  </div>
  <div class="headertitle">
<div class="title">xpciepsu_egress_ep_enable_example.c File Reference</div>  </div>
</div><!--header-->
<div class="contents">
<a name="details" id="details"></a><h2 class="groupheader">Overview</h2>
<div class="textblock"><p>This file contains a design example for using PS PCIe IP and its driver. </p>
<p>This is an example to show the usage of driver APIs which configures PS PCIe EndPoint.</p>
<p>The example initializes the PS PCIe EndPoint and shows how to use the API's.</p>
<p>This code will illustrate how the XPciePsu and its standalone driver can be used to:</p>
<ul>
<li>Initialize a PS PCIe bridge core built as an end point</li>
<li>Retrieve root complex configuration assigned to end point</li>
<li>Provides Egress translation setup</li>
</ul>
<p>We tried to use as much of the driver's API calls as possible to show the reader how each call could be used and that probably made the example not the shortest way of doing the tasks shown as they could be done.</p>
<pre>
  MODIFICATION HISTORY:</pre><pre>  Ver   Who  Date     Changes
</p>
<hr/>
<p>
   1.0   tk  02/13              Initial version
*</pre> </div><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="func-members"></a>
Functions</h2></td></tr>
<tr class="memitem:a71de060d9b164f1bcc1a31f0dea4fe07"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="xpciepsu__egress__ep__enable__example_8c.html#a71de060d9b164f1bcc1a31f0dea4fe07">XPciePsu_InitEndPoint</a> (XPciePsu *PciePsuPtr, u16 DeviceId)</td></tr>
<tr class="memdesc:a71de060d9b164f1bcc1a31f0dea4fe07"><td class="mdescLeft">&#160;</td><td class="mdescRight">This function initializes a PSU PCIe EndPoint complex.  <a href="#a71de060d9b164f1bcc1a31f0dea4fe07">More...</a><br/></td></tr>
<tr class="separator:a71de060d9b164f1bcc1a31f0dea4fe07"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a77aeb276879c8d92a9169d7f6c3f4b98"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="xpciepsu__egress__ep__enable__example_8c.html#a77aeb276879c8d92a9169d7f6c3f4b98">XPciePsu_EP_IntrHandler</a> (XPciePsu *PciePsuPtr)</td></tr>
<tr class="memdesc:a77aeb276879c8d92a9169d7f6c3f4b98"><td class="mdescLeft">&#160;</td><td class="mdescRight">This function handles doorbell interrupts for PCIE Endpoint.  <a href="#a77aeb276879c8d92a9169d7f6c3f4b98">More...</a><br/></td></tr>
<tr class="separator:a77aeb276879c8d92a9169d7f6c3f4b98"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:afbd3f656856f1fc2ad0c4d9d51a7b23a"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="xpciepsu__egress__ep__enable__example_8c.html#afbd3f656856f1fc2ad0c4d9d51a7b23a">XPciePsu_EP_InitIntr</a> (void)</td></tr>
<tr class="memdesc:afbd3f656856f1fc2ad0c4d9d51a7b23a"><td class="mdescLeft">&#160;</td><td class="mdescRight">This function Initializes interrupts for PCIe EndPoint.  <a href="#afbd3f656856f1fc2ad0c4d9d51a7b23a">More...</a><br/></td></tr>
<tr class="separator:afbd3f656856f1fc2ad0c4d9d51a7b23a"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ae66f6b31b5ad750f1fe042a706a4e3d4"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="xpciepsu__egress__ep__enable__example_8c.html#ae66f6b31b5ad750f1fe042a706a4e3d4">main</a> ()</td></tr>
<tr class="memdesc:ae66f6b31b5ad750f1fe042a706a4e3d4"><td class="mdescLeft">&#160;</td><td class="mdescRight">This function is the entry point for PCIe EndPoint Example.  <a href="#ae66f6b31b5ad750f1fe042a706a4e3d4">More...</a><br/></td></tr>
<tr class="separator:ae66f6b31b5ad750f1fe042a706a4e3d4"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<h2 class="groupheader">Function Documentation</h2>
<a class="anchor" id="ae66f6b31b5ad750f1fe042a706a4e3d4"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int main </td>
          <td>(</td>
          <td class="paramtype">void&#160;</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>This function is the entry point for PCIe EndPoint Example. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">None</td><td></td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>- XST_SUCCESS if successful<ul>
<li>XST_FAILURE if unsuccessful.</li>
</ul>
</dd></dl>
<dl class="section note"><dt>Note</dt><dd>None. </dd></dl>

<p>References <a class="el" href="xpciepsu__ep_8c.html#a6486e8d86d93762e998010aa29efd100">XPciePsu_Egress_EP_BridgeInitialize()</a>, <a class="el" href="xpciepsu__egress__ep__enable__example_8c.html#afbd3f656856f1fc2ad0c4d9d51a7b23a">XPciePsu_EP_InitIntr()</a>, <a class="el" href="xpciepsu__ep_8c.html#ac7e335a61b13a5455ddaa43f46a416a4">XPciePsu_EP_SetupEgress()</a>, <a class="el" href="xpciepsu__ep_8c.html#aca1b71a1574b91939ee539c11556ce88">XPciePsu_EP_WaitForLinkup()</a>, <a class="el" href="xpciepsu__egress__ep__enable__example_8c.html#a71de060d9b164f1bcc1a31f0dea4fe07">XPciePsu_InitEndPoint()</a>, <a class="el" href="xpciepsu_8c.html#a0cfd7833187346f6f654d80a359951b0">XPciePsu_ReadReg()</a>, and <a class="el" href="xpciepsu_8c.html#a558622766b2c01af123a216c1d682376">XPciePsu_WriteReg()</a>.</p>

</div>
</div>
<a class="anchor" id="afbd3f656856f1fc2ad0c4d9d51a7b23a"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int XPciePsu_EP_InitIntr </td>
          <td>(</td>
          <td class="paramtype">void&#160;</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>This function Initializes interrupts for PCIe EndPoint. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">None</td><td></td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>- XST_SUCCESS if successful<ul>
<li>XST_FAILURE if unsuccessful</li>
</ul>
</dd></dl>
<dl class="section note"><dt>Note</dt><dd>None </dd></dl>

<p>References <a class="el" href="xpciepsu__egress__ep__enable__example_8c.html#a77aeb276879c8d92a9169d7f6c3f4b98">XPciePsu_EP_IntrHandler()</a>.</p>

<p>Referenced by <a class="el" href="xpciepsu__egress__ep__enable__example_8c.html#ae66f6b31b5ad750f1fe042a706a4e3d4">main()</a>.</p>

</div>
</div>
<a class="anchor" id="a77aeb276879c8d92a9169d7f6c3f4b98"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void XPciePsu_EP_IntrHandler </td>
          <td>(</td>
          <td class="paramtype">XPciePsu *&#160;</td>
          <td class="paramname"><em>PciePsuPtr</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>This function handles doorbell interrupts for PCIE Endpoint. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">PciePsuPtr</td><td>is a pointer to an instance of XPciePsu data</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>-None</dd></dl>
<dl class="section note"><dt>Note</dt><dd>None </dd></dl>

<p>References <a class="el" href="xpciepsu_8c.html#a0cfd7833187346f6f654d80a359951b0">XPciePsu_ReadReg()</a>, and <a class="el" href="xpciepsu_8c.html#a558622766b2c01af123a216c1d682376">XPciePsu_WriteReg()</a>.</p>

<p>Referenced by <a class="el" href="xpciepsu__egress__ep__enable__example_8c.html#afbd3f656856f1fc2ad0c4d9d51a7b23a">XPciePsu_EP_InitIntr()</a>.</p>

</div>
</div>
<a class="anchor" id="a71de060d9b164f1bcc1a31f0dea4fe07"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int XPciePsu_InitEndPoint </td>
          <td>(</td>
          <td class="paramtype">XPciePsu *&#160;</td>
          <td class="paramname"><em>PciePsuPtr</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">u16&#160;</td>
          <td class="paramname"><em>DeviceId</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>This function initializes a PSU PCIe EndPoint complex. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">PciePsuPtr</td><td>is a pointer to an instance of XPciePsu data structure represents a root complex. </td></tr>
    <tr><td class="paramname">DeviceId</td><td>is PSU PCIe root complex unique ID</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>- XST_SUCCESS if successful.<ul>
<li>XST_FAILURE if unsuccessful.</li>
</ul>
</dd></dl>
<dl class="section note"><dt>Note</dt><dd>None. </dd></dl>

<p>References <a class="el" href="xpciepsu__ep_8c.html#a242ba36cd7d2aa4f33863bc5aa8075d8">XPciePsu_EP_CfgInitialize()</a>, and <a class="el" href="xpciepsu_8h.html#acd35420aa1975d4b277d533e71be6187">XPciePsu_LookupConfig()</a>.</p>

<p>Referenced by <a class="el" href="xpciepsu__egress__ep__enable__example_8c.html#ae66f6b31b5ad750f1fe042a706a4e3d4">main()</a>.</p>

</div>
</div>
</div><!-- contents -->
</div><!-- doc-content -->
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
	<p class="footer">&copy; Copyright 2015-2022 Xilinx, Inc. All Rights Reserved.</p>
	<p class="footer">&copy; Copyright 2022-2023 Advanced Micro Devices, Inc. All Rights Reserved.</p>
</div>
</body>
</html>
